A computer processes media information as a series of numbers representing that information. For example, a single number may represent the intensity of brightness or the intensity of a color component such as red, green or blue for each elementary small region of a picture, so that the digital representation of the picture consists of one or more arrays of such numbers. Each such number may be referred to as a sample. For a color image, it is conventional to use more than one sample to represent the color of each elemental region. The set of these samples for an elemental region may be referred to as a pixel. For example, one pixel may consist of three samples that represent the intensity of red, green and blue (or R, G and B) light.
Sample depth is a property normally measured in bits that indicates the range of numbers that can be used to represent a sample. When more values are possible for the sample, quality can be higher because the number can capture more subtle variations in intensity and/or a greater range of values. Nominal range (also called “color range”) indicates the range of values used for a sample, within the available range for a sample depth. For example, for 8-bit samples with an available range of 0 . . . 255, the nominal range can be 16 . . . 235 for some purposes (such as media coding/decoding or conventional television display), 48 . . . 208 for some purposes, and 0 . . . 255 for other purposes (such as video editing or viewing on a newer display).
Between different stages of processing, samples may be converted between color spaces, scaled between nominal ranges, or subjected to other processing. For example, a video source such as a camera or screen capture module may provide video in a color space such as RGB with a nominal range of 0 . . . 255 per 8-bit sample. The samples may be converted to a YUV format with a nominal range of 16 . . . 235 per 8-bit sample. A YUV format includes a luma (or Y) component with sample values representing approximate brightness values as well as multiple chroma (or U and V) components with sample values representing color difference values.
Engineers use compression (also called source coding or source encoding) to reduce the bit rate of digital video. Compression decreases the cost of storing and transmitting video information by converting the information into a lower bit rate form. Decompression (also called decoding) reconstructs a version of the original information from the compressed form. A “codec” is an encoder/decoder system. Over the last two decades, various video codec standards have been adopted, including the H.261, H.262 (MPEG-2 or ISO/IEC 13818-2), H.263, H.264 (ISO/IEC 14496-10) standards, the MPEG-1 (ISO/IEC 11172-2) and MPEG-4 Visual (ISO/IEC 14496-2) standards, the SMPTE 421M standard, and the emerging HEVC standard. A video codec standard typically defines options for the syntax of an encoded video bitstream, detailing parameters in the bitstream when particular features are used in encoding and decoding. In many cases, a video codec standard also provides details about the decoding operations a decoder should perform to achieve correct results in decoding.
In general, a media container format specifies how to organize encoded media content for a media stream or streams for storage, transmission, etc. Along with identifying information for the media content, a media container format can specify metadata about the media content, timing information and error correction information.
Some video codec formats and media container formats support only a single nominal range for video, such as 16 . . . 235 in YUV color space. A video source may provide video having the full nominal range of 0 . . . 255, however, rather than a limited range such as 16 . . . 235. If conversions between color spaces and nominal ranges are not handled correctly, the quality of video can suffer due to clipping of values or due to playback of “limited range” values mistaken as “full range” values. More generally, even if conversions between color spaces and nominal ranges are handled correctly, conversion from full nominal range to limited nominal range can hurt quality due to loss in color fidelity.